{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建一个符合正态分布的10个股票5天的涨跌幅数据\n",
    "stock_change = np.random.normal(0, 1, (10, 5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.29504032, -0.72150264, -1.09438712, -1.11262475, -0.61620871],\n",
       "       [-0.11315654, -0.56898494, -0.63344269,  1.18373347,  0.57965326],\n",
       "       [ 0.32887416, -0.63476724, -0.52320243,  1.07260098,  0.55915561],\n",
       "       [-0.1258094 ,  0.54619816, -0.63207234,  0.51058023,  1.47570746],\n",
       "       [-1.43026656,  0.83368104,  0.7788256 ,  1.31842287,  0.88201058],\n",
       "       [-2.23275642, -0.01186024, -0.15877461, -0.68912555, -0.08051147],\n",
       "       [-1.65027286,  0.81832165, -0.28683653, -0.4583203 ,  2.28578994],\n",
       "       [-1.5567861 ,  0.19586843,  0.08213441,  1.18533083,  0.71620909],\n",
       "       [ 0.52814105, -0.72119851,  0.17256751,  0.59915659,  0.83394836],\n",
       "       [ 1.12403146, -0.43113623,  0.46114683, -0.59663894,  1.10002041]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stock_change"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将stock_change转换成dataframe格式\n",
    "data = pd.DataFrame(stock_change)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.080511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>-1.650273</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>2.285790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.716209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.528141</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>0.833948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1.124031</td>\n",
       "      <td>-0.431136</td>\n",
       "      <td>0.461147</td>\n",
       "      <td>-0.596639</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          0         1         2         3         4\n",
       "0 -0.295040 -0.721503 -1.094387 -1.112625 -0.616209\n",
       "1 -0.113157 -0.568985 -0.633443  1.183733  0.579653\n",
       "2  0.328874 -0.634767 -0.523202  1.072601  0.559156\n",
       "3 -0.125809  0.546198 -0.632072  0.510580  1.475707\n",
       "4 -1.430267  0.833681  0.778826  1.318423  0.882011\n",
       "5 -2.232756 -0.011860 -0.158775 -0.689126 -0.080511\n",
       "6 -1.650273  0.818322 -0.286837 -0.458320  2.285790\n",
       "7 -1.556786  0.195868  0.082134  1.185331  0.716209\n",
       "8  0.528141 -0.721199  0.172568  0.599157  0.833948\n",
       "9  1.124031 -0.431136  0.461147 -0.596639  1.100020"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "stock_name = [\"股票{}\".format(i) for i in range(10)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票5</th>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.080511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票6</th>\n",
       "      <td>-1.650273</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>2.285790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票7</th>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.716209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票8</th>\n",
       "      <td>0.528141</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>0.833948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票9</th>\n",
       "      <td>1.124031</td>\n",
       "      <td>-0.431136</td>\n",
       "      <td>0.461147</td>\n",
       "      <td>-0.596639</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            0         1         2         3         4\n",
       "股票0 -0.295040 -0.721503 -1.094387 -1.112625 -0.616209\n",
       "股票1 -0.113157 -0.568985 -0.633443  1.183733  0.579653\n",
       "股票2  0.328874 -0.634767 -0.523202  1.072601  0.559156\n",
       "股票3 -0.125809  0.546198 -0.632072  0.510580  1.475707\n",
       "股票4 -1.430267  0.833681  0.778826  1.318423  0.882011\n",
       "股票5 -2.232756 -0.011860 -0.158775 -0.689126 -0.080511\n",
       "股票6 -1.650273  0.818322 -0.286837 -0.458320  2.285790\n",
       "股票7 -1.556786  0.195868  0.082134  1.185331  0.716209\n",
       "股票8  0.528141 -0.721199  0.172568  0.599157  0.833948\n",
       "股票9  1.124031 -0.431136  0.461147 -0.596639  1.100020"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 添加行索引\n",
    "pd.DataFrame(stock_change, index=stock_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 构造日期序列\n",
    "date = pd.date_range(start=\"20170102\", periods=5, freq=\"B\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 构建说明完整的数据\n",
    "data = pd.DataFrame(stock_change, index=stock_name, columns=date)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票5</th>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.080511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票6</th>\n",
       "      <td>-1.650273</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>2.285790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票7</th>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.716209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票8</th>\n",
       "      <td>0.528141</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>0.833948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票9</th>\n",
       "      <td>1.124031</td>\n",
       "      <td>-0.431136</td>\n",
       "      <td>0.461147</td>\n",
       "      <td>-0.596639</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "股票0   -0.295040   -0.721503   -1.094387   -1.112625   -0.616209\n",
       "股票1   -0.113157   -0.568985   -0.633443    1.183733    0.579653\n",
       "股票2    0.328874   -0.634767   -0.523202    1.072601    0.559156\n",
       "股票3   -0.125809    0.546198   -0.632072    0.510580    1.475707\n",
       "股票4   -1.430267    0.833681    0.778826    1.318423    0.882011\n",
       "股票5   -2.232756   -0.011860   -0.158775   -0.689126   -0.080511\n",
       "股票6   -1.650273    0.818322   -0.286837   -0.458320    2.285790\n",
       "股票7   -1.556786    0.195868    0.082134    1.185331    0.716209\n",
       "股票8    0.528141   -0.721199    0.172568    0.599157    0.833948\n",
       "股票9    1.124031   -0.431136    0.461147   -0.596639    1.100020"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "###  2 DataFrame的属性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(10, 5)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 形状\n",
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['股票0', '股票1', '股票2', '股票3', '股票4', '股票5', '股票6', '股票7', '股票8', '股票9'], dtype='object')"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 行索引\n",
    "data.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2017-01-02', '2017-01-03', '2017-01-04', '2017-01-05',\n",
       "               '2017-01-06'],\n",
       "              dtype='datetime64[ns]', freq='B')"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 列索引\n",
    "data.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-0.29504032, -0.72150264, -1.09438712, -1.11262475, -0.61620871],\n",
       "       [-0.11315654, -0.56898494, -0.63344269,  1.18373347,  0.57965326],\n",
       "       [ 0.32887416, -0.63476724, -0.52320243,  1.07260098,  0.55915561],\n",
       "       [-0.1258094 ,  0.54619816, -0.63207234,  0.51058023,  1.47570746],\n",
       "       [-1.43026656,  0.83368104,  0.7788256 ,  1.31842287,  0.88201058],\n",
       "       [-2.23275642, -0.01186024, -0.15877461, -0.68912555, -0.08051147],\n",
       "       [-1.65027286,  0.81832165, -0.28683653, -0.4583203 ,  2.28578994],\n",
       "       [-1.5567861 ,  0.19586843,  0.08213441,  1.18533083,  0.71620909],\n",
       "       [ 0.52814105, -0.72119851,  0.17256751,  0.59915659,  0.83394836],\n",
       "       [ 1.12403146, -0.43113623,  0.46114683, -0.59663894,  1.10002041]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 值\n",
    "data.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票0</th>\n",
       "      <th>股票1</th>\n",
       "      <th>股票2</th>\n",
       "      <th>股票3</th>\n",
       "      <th>股票4</th>\n",
       "      <th>股票5</th>\n",
       "      <th>股票6</th>\n",
       "      <th>股票7</th>\n",
       "      <th>股票8</th>\n",
       "      <th>股票9</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2017-01-02</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.113157</td>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.125809</td>\n",
       "      <td>-1.430267</td>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-1.650273</td>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.528141</td>\n",
       "      <td>1.124031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-03</th>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>-0.431136</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-04</th>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.461147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-05</th>\n",
       "      <td>-1.112625</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>-0.596639</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-06</th>\n",
       "      <td>-0.616209</td>\n",
       "      <td>0.579653</td>\n",
       "      <td>0.559156</td>\n",
       "      <td>1.475707</td>\n",
       "      <td>0.882011</td>\n",
       "      <td>-0.080511</td>\n",
       "      <td>2.285790</td>\n",
       "      <td>0.716209</td>\n",
       "      <td>0.833948</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 股票0       股票1       股票2       股票3       股票4       股票5  \\\n",
       "2017-01-02 -0.295040 -0.113157  0.328874 -0.125809 -1.430267 -2.232756   \n",
       "2017-01-03 -0.721503 -0.568985 -0.634767  0.546198  0.833681 -0.011860   \n",
       "2017-01-04 -1.094387 -0.633443 -0.523202 -0.632072  0.778826 -0.158775   \n",
       "2017-01-05 -1.112625  1.183733  1.072601  0.510580  1.318423 -0.689126   \n",
       "2017-01-06 -0.616209  0.579653  0.559156  1.475707  0.882011 -0.080511   \n",
       "\n",
       "                 股票6       股票7       股票8       股票9  \n",
       "2017-01-02 -1.650273 -1.556786  0.528141  1.124031  \n",
       "2017-01-03  0.818322  0.195868 -0.721199 -0.431136  \n",
       "2017-01-04 -0.286837  0.082134  0.172568  0.461147  \n",
       "2017-01-05 -0.458320  1.185331  0.599157 -0.596639  \n",
       "2017-01-06  2.285790  0.716209  0.833948  1.100020  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 转置\n",
    "data.T"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "股票0   -0.295040   -0.721503   -1.094387   -1.112625   -0.616209\n",
       "股票1   -0.113157   -0.568985   -0.633443    1.183733    0.579653\n",
       "股票2    0.328874   -0.634767   -0.523202    1.072601    0.559156\n",
       "股票3   -0.125809    0.546198   -0.632072    0.510580    1.475707\n",
       "股票4   -1.430267    0.833681    0.778826    1.318423    0.882011"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票5</th>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.080511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票6</th>\n",
       "      <td>-1.650273</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>2.285790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票7</th>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.716209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票8</th>\n",
       "      <td>0.528141</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>0.833948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票9</th>\n",
       "      <td>1.124031</td>\n",
       "      <td>-0.431136</td>\n",
       "      <td>0.461147</td>\n",
       "      <td>-0.596639</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "股票5   -2.232756   -0.011860   -0.158775   -0.689126   -0.080511\n",
       "股票6   -1.650273    0.818322   -0.286837   -0.458320    2.285790\n",
       "股票7   -1.556786    0.195868    0.082134    1.185331    0.716209\n",
       "股票8    0.528141   -0.721199    0.172568    0.599157    0.833948\n",
       "股票9    1.124031   -0.431136    0.461147   -0.596639    1.100020"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票5</th>\n",
       "      <td>-2.232756</td>\n",
       "      <td>-0.011860</td>\n",
       "      <td>-0.158775</td>\n",
       "      <td>-0.689126</td>\n",
       "      <td>-0.080511</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票6</th>\n",
       "      <td>-1.650273</td>\n",
       "      <td>0.818322</td>\n",
       "      <td>-0.286837</td>\n",
       "      <td>-0.458320</td>\n",
       "      <td>2.285790</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票7</th>\n",
       "      <td>-1.556786</td>\n",
       "      <td>0.195868</td>\n",
       "      <td>0.082134</td>\n",
       "      <td>1.185331</td>\n",
       "      <td>0.716209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票8</th>\n",
       "      <td>0.528141</td>\n",
       "      <td>-0.721199</td>\n",
       "      <td>0.172568</td>\n",
       "      <td>0.599157</td>\n",
       "      <td>0.833948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票9</th>\n",
       "      <td>1.124031</td>\n",
       "      <td>-0.431136</td>\n",
       "      <td>0.461147</td>\n",
       "      <td>-0.596639</td>\n",
       "      <td>1.100020</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "股票0   -0.295040   -0.721503   -1.094387   -1.112625   -0.616209\n",
       "股票1   -0.113157   -0.568985   -0.633443    1.183733    0.579653\n",
       "股票2    0.328874   -0.634767   -0.523202    1.072601    0.559156\n",
       "股票3   -0.125809    0.546198   -0.632072    0.510580    1.475707\n",
       "股票4   -1.430267    0.833681    0.778826    1.318423    0.882011\n",
       "股票5   -2.232756   -0.011860   -0.158775   -0.689126   -0.080511\n",
       "股票6   -1.650273    0.818322   -0.286837   -0.458320    2.285790\n",
       "股票7   -1.556786    0.195868    0.082134    1.185331    0.716209\n",
       "股票8    0.528141   -0.721199    0.172568    0.599157    0.833948\n",
       "股票9    1.124031   -0.431136    0.461147   -0.596639    1.100020"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# data.index[4] = \"stock\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 构造新的股票名序列\n",
    "stock_newname = [\"股票_{}\".format(i) for i in range(10)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 必须整体修改\n",
    "data.index = stock_newname"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>股票_0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票_1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票_2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票_3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>股票_4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "股票_0   -0.295040   -0.721503   -1.094387   -1.112625   -0.616209\n",
       "股票_1   -0.113157   -0.568985   -0.633443    1.183733    0.579653\n",
       "股票_2    0.328874   -0.634767   -0.523202    1.072601    0.559156\n",
       "股票_3   -0.125809    0.546198   -0.632072    0.510580    1.475707\n",
       "股票_4   -1.430267    0.833681    0.778826    1.318423    0.882011"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2017-01-02 00:00:00</th>\n",
       "      <th>2017-01-03 00:00:00</th>\n",
       "      <th>2017-01-04 00:00:00</th>\n",
       "      <th>2017-01-05 00:00:00</th>\n",
       "      <th>2017-01-06 00:00:00</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.295040</td>\n",
       "      <td>-0.721503</td>\n",
       "      <td>-1.094387</td>\n",
       "      <td>-1.112625</td>\n",
       "      <td>-0.616209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.113157</td>\n",
       "      <td>-0.568985</td>\n",
       "      <td>-0.633443</td>\n",
       "      <td>1.183733</td>\n",
       "      <td>0.579653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.328874</td>\n",
       "      <td>-0.634767</td>\n",
       "      <td>-0.523202</td>\n",
       "      <td>1.072601</td>\n",
       "      <td>0.559156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-0.125809</td>\n",
       "      <td>0.546198</td>\n",
       "      <td>-0.632072</td>\n",
       "      <td>0.510580</td>\n",
       "      <td>1.475707</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.430267</td>\n",
       "      <td>0.833681</td>\n",
       "      <td>0.778826</td>\n",
       "      <td>1.318423</td>\n",
       "      <td>0.882011</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   2017-01-02  2017-01-03  2017-01-04  2017-01-05  2017-01-06\n",
       "0   -0.295040   -0.721503   -1.094387   -1.112625   -0.616209\n",
       "1   -0.113157   -0.568985   -0.633443    1.183733    0.579653\n",
       "2    0.328874   -0.634767   -0.523202    1.072601    0.559156\n",
       "3   -0.125809    0.546198   -0.632072    0.510580    1.475707\n",
       "4   -1.430267    0.833681    0.778826    1.318423    0.882011"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 重设索引\n",
    "data.reset_index(drop=True).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 设置新索引\n",
    "df = pd.DataFrame({'month': [1, 4, 7, 10],\n",
    "                    'year': [2012, 2014, 2013, 2014],\n",
    "                    'sale':[55, 40, 84, 31]})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>month</th>\n",
       "      <th>sale</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>55</td>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>40</td>\n",
       "      <td>2014</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7</td>\n",
       "      <td>84</td>\n",
       "      <td>2013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>10</td>\n",
       "      <td>31</td>\n",
       "      <td>2014</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   month  sale  year\n",
       "0      1    55  2012\n",
       "1      4    40  2014\n",
       "2      7    84  2013\n",
       "3     10    31  2014"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2、以月份设置新的索引\n",
    "df1 = df.set_index(\"month\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>sale</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>month</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>55</td>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>40</td>\n",
       "      <td>2014</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>84</td>\n",
       "      <td>2013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>31</td>\n",
       "      <td>2014</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       sale  year\n",
       "month            \n",
       "1        55  2012\n",
       "4        40  2014\n",
       "7        84  2013\n",
       "10       31  2014"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 3、设置多个索引，以年和月份\n",
    "df2 = df.set_index([\"year\", \"month\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>sale</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <th>1</th>\n",
       "      <td>55</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <th>4</th>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013</th>\n",
       "      <th>7</th>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <th>10</th>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            sale\n",
       "year month      \n",
       "2012 1        55\n",
       "2014 4        40\n",
       "2013 7        84\n",
       "2014 10       31"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Int64Index([1, 4, 7, 10], dtype='int64', name='month')"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MultiIndex(levels=[[2012, 2013, 2014], [1, 4, 7, 10]],\n",
       "           labels=[[0, 2, 1, 2], [0, 1, 2, 3]],\n",
       "           names=['year', 'month'])"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "FrozenList(['year', 'month'])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# MultiIndex属性\n",
    "df2.index.names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "FrozenList([[2012, 2013, 2014], [1, 4, 7, 10]])"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.index.levels"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Panel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "p = pd.Panel(np.arange(24).reshape(4,3,2),\n",
    "                 items=list('ABCD'),\n",
    "                 major_axis=pd.date_range('20130101', periods=3),\n",
    "                 minor_axis=['first', 'second'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<class 'pandas.core.panel.Panel'>\n",
       "Dimensions: 4 (items) x 3 (major_axis) x 2 (minor_axis)\n",
       "Items axis: A to D\n",
       "Major_axis axis: 2013-01-01 00:00:00 to 2013-01-03 00:00:00\n",
       "Minor_axis axis: first to second"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>first</th>\n",
       "      <th>second</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-01-01</th>\n",
       "      <td>18</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-01-02</th>\n",
       "      <td>20</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-01-03</th>\n",
       "      <td>22</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            first  second\n",
       "2013-01-01     18      19\n",
       "2013-01-02     20      21\n",
       "2013-01-03     22      23"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p[\"D\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>first</th>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>12</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>second</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        A  B   C   D\n",
       "first   0  6  12  18\n",
       "second  1  7  13  19"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p.major_xs(\"20130101\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2013-01-01</th>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>13</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-01-02</th>\n",
       "      <td>3</td>\n",
       "      <td>9</td>\n",
       "      <td>15</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2013-01-03</th>\n",
       "      <td>5</td>\n",
       "      <td>11</td>\n",
       "      <td>17</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            A   B   C   D\n",
       "2013-01-01  1   7  13  19\n",
       "2013-01-02  3   9  15  21\n",
       "2013-01-03  5  11  17  23"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p.minor_xs(\"second\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [],
   "source": [
    "# p[0,:,:] 有的版本可以这么用"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 我们将之前的涨跌幅数据进行转置，然后获取'股票0'的所有数据\n",
    "sr = data.T[\"股票_0\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.series.Series"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(data.T[\"股票_0\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1 创建Series"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    0\n",
       "1    1\n",
       "2    2\n",
       "3    3\n",
       "4    4\n",
       "5    5\n",
       "6    6\n",
       "7    7\n",
       "8    8\n",
       "9    9\n",
       "dtype: int64"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 指定内容，默认索引\n",
    "pd.Series(np.arange(10))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3     0\n",
       "4     1\n",
       "5     2\n",
       "6     3\n",
       "7     4\n",
       "8     5\n",
       "9     6\n",
       "10    7\n",
       "11    8\n",
       "12    9\n",
       "dtype: int64"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series(np.arange(10), index=range(3, 13))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "blue       200\n",
       "green      500\n",
       "red        100\n",
       "yellow    1000\n",
       "dtype: int64"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Series({'red':100, 'blue':200, 'green': 500, 'yellow':1000})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2 Series获取索引和值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2017-01-02', '2017-01-03', '2017-01-04', '2017-01-05',\n",
       "               '2017-01-06'],\n",
       "              dtype='datetime64[ns]', freq='B')"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sr.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.29504032, -0.72150264, -1.09438712, -1.11262475, -0.61620871])"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sr.values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.2 基本数据操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 读取文件\n",
    "data = pd.read_csv(\"./stock_day/stock_day.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>22.942</td>\n",
       "      <td>22.142</td>\n",
       "      <td>22.875</td>\n",
       "      <td>53782.64</td>\n",
       "      <td>46738.65</td>\n",
       "      <td>55576.11</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>22.406</td>\n",
       "      <td>21.955</td>\n",
       "      <td>22.942</td>\n",
       "      <td>40827.52</td>\n",
       "      <td>42736.34</td>\n",
       "      <td>56007.50</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>21.938</td>\n",
       "      <td>21.929</td>\n",
       "      <td>23.022</td>\n",
       "      <td>35119.58</td>\n",
       "      <td>41871.97</td>\n",
       "      <td>56372.85</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>21.446</td>\n",
       "      <td>21.909</td>\n",
       "      <td>23.137</td>\n",
       "      <td>35397.58</td>\n",
       "      <td>39904.78</td>\n",
       "      <td>60149.60</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>21.366</td>\n",
       "      <td>21.923</td>\n",
       "      <td>23.253</td>\n",
       "      <td>33590.21</td>\n",
       "      <td>42935.74</td>\n",
       "      <td>61716.11</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "               ma5    ma10    ma20     v_ma5    v_ma10    v_ma20  turnover  \n",
       "2018-02-27  22.942  22.142  22.875  53782.64  46738.65  55576.11      2.39  \n",
       "2018-02-26  22.406  21.955  22.942  40827.52  42736.34  56007.50      1.53  \n",
       "2018-02-23  21.938  21.929  23.022  35119.58  41871.97  56372.85      1.32  \n",
       "2018-02-22  21.446  21.909  23.137  35397.58  39904.78  60149.60      0.90  \n",
       "2018-02-14  21.366  21.923  23.253  33590.21  42935.74  61716.11      0.58  "
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = data.drop([\"ma5\",\"ma10\",\"ma20\",\"v_ma5\",\"v_ma10\",\"v_ma20\"], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.2.1 索引操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "22.8"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.iloc[1, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "22.8"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 直接进行索引\n",
    "# 先列后行\n",
    "data[\"open\"][\"2018-02-26\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 先行后列\n",
    "# data[\"2018-02-26\"][\"open\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "22.8"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 结合loc或者iloc使用索引\n",
    "data.loc[\"2018-02-26\"][\"open\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "22.8"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.iloc[1, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/zwy/.virtualenvs/python89/lib/python3.6/site-packages/ipykernel_launcher.py:2: DeprecationWarning: \n",
      ".ix is deprecated. Please use\n",
      ".loc for label based indexing or\n",
      ".iloc for positional indexing\n",
      "\n",
      "See the documentation here:\n",
      "http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated\n",
      "  \n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>24.16</td>\n",
       "      <td>25.88</td>\n",
       "      <td>23.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.53</td>\n",
       "      <td>23.78</td>\n",
       "      <td>22.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>22.82</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.02</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open  close   high    low\n",
       "2018-02-27  23.53  24.16  25.88  23.53\n",
       "2018-02-26  22.80  23.53  23.78  22.80\n",
       "2018-02-23  22.88  22.82  23.37  22.71\n",
       "2018-02-22  22.25  22.28  22.76  22.02"
      ]
     },
     "execution_count": 91,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取行第1天到第4天，['open', 'close', 'high', 'low']这个四个指标的结果\n",
    "data.ix[:4, ['open', 'close', 'high', 'low']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.2.2 赋值操作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [],
   "source": [
    "data[\"open\"] = 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [],
   "source": [
    "data.open = 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>10</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>10</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>10</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>10</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>10</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27    10  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26    10  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23    10  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22    10  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14    10  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.2.3 排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-08-28</th>\n",
       "      <td>15.40</td>\n",
       "      <td>16.46</td>\n",
       "      <td>16.46</td>\n",
       "      <td>15.00</td>\n",
       "      <td>117827.60</td>\n",
       "      <td>1.50</td>\n",
       "      <td>10.03</td>\n",
       "      <td>4.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-21</th>\n",
       "      <td>27.50</td>\n",
       "      <td>28.22</td>\n",
       "      <td>28.22</td>\n",
       "      <td>26.50</td>\n",
       "      <td>121190.11</td>\n",
       "      <td>2.57</td>\n",
       "      <td>10.02</td>\n",
       "      <td>4.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-22</th>\n",
       "      <td>18.50</td>\n",
       "      <td>20.42</td>\n",
       "      <td>20.42</td>\n",
       "      <td>18.45</td>\n",
       "      <td>150470.83</td>\n",
       "      <td>1.86</td>\n",
       "      <td>10.02</td>\n",
       "      <td>3.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-08-04</th>\n",
       "      <td>16.20</td>\n",
       "      <td>17.35</td>\n",
       "      <td>17.35</td>\n",
       "      <td>15.80</td>\n",
       "      <td>94292.63</td>\n",
       "      <td>1.58</td>\n",
       "      <td>10.02</td>\n",
       "      <td>3.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-07-07</th>\n",
       "      <td>18.66</td>\n",
       "      <td>18.66</td>\n",
       "      <td>18.66</td>\n",
       "      <td>18.41</td>\n",
       "      <td>48756.55</td>\n",
       "      <td>1.70</td>\n",
       "      <td>10.02</td>\n",
       "      <td>1.67</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low     volume  price_change  p_change  \\\n",
       "2015-08-28  15.40  16.46  16.46  15.00  117827.60          1.50     10.03   \n",
       "2015-05-21  27.50  28.22  28.22  26.50  121190.11          2.57     10.02   \n",
       "2016-12-22  18.50  20.42  20.42  18.45  150470.83          1.86     10.02   \n",
       "2015-08-04  16.20  17.35  17.35  15.80   94292.63          1.58     10.02   \n",
       "2016-07-07  18.66  18.66  18.66  18.41   48756.55          1.70     10.02   \n",
       "\n",
       "            turnover  \n",
       "2015-08-28      4.03  \n",
       "2015-05-21      4.15  \n",
       "2016-12-22      3.77  \n",
       "2015-08-04      3.23  \n",
       "2016-07-07      1.67  "
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按照涨跌幅大小进行排序 , 使用ascending指定按照大小排序\n",
    "data.sort_values(\"p_change\", ascending=False).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-08-28</th>\n",
       "      <td>15.40</td>\n",
       "      <td>16.46</td>\n",
       "      <td>16.46</td>\n",
       "      <td>15.00</td>\n",
       "      <td>117827.60</td>\n",
       "      <td>1.50</td>\n",
       "      <td>10.03</td>\n",
       "      <td>4.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-21</th>\n",
       "      <td>27.50</td>\n",
       "      <td>28.22</td>\n",
       "      <td>28.22</td>\n",
       "      <td>26.50</td>\n",
       "      <td>121190.11</td>\n",
       "      <td>2.57</td>\n",
       "      <td>10.02</td>\n",
       "      <td>4.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-07-07</th>\n",
       "      <td>18.66</td>\n",
       "      <td>18.66</td>\n",
       "      <td>18.66</td>\n",
       "      <td>18.41</td>\n",
       "      <td>48756.55</td>\n",
       "      <td>1.70</td>\n",
       "      <td>10.02</td>\n",
       "      <td>1.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-12-22</th>\n",
       "      <td>18.50</td>\n",
       "      <td>20.42</td>\n",
       "      <td>20.42</td>\n",
       "      <td>18.45</td>\n",
       "      <td>150470.83</td>\n",
       "      <td>1.86</td>\n",
       "      <td>10.02</td>\n",
       "      <td>3.77</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-08-04</th>\n",
       "      <td>16.20</td>\n",
       "      <td>17.35</td>\n",
       "      <td>17.35</td>\n",
       "      <td>15.80</td>\n",
       "      <td>94292.63</td>\n",
       "      <td>1.58</td>\n",
       "      <td>10.02</td>\n",
       "      <td>3.23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low     volume  price_change  p_change  \\\n",
       "2015-08-28  15.40  16.46  16.46  15.00  117827.60          1.50     10.03   \n",
       "2015-05-21  27.50  28.22  28.22  26.50  121190.11          2.57     10.02   \n",
       "2016-07-07  18.66  18.66  18.66  18.41   48756.55          1.70     10.02   \n",
       "2016-12-22  18.50  20.42  20.42  18.45  150470.83          1.86     10.02   \n",
       "2015-08-04  16.20  17.35  17.35  15.80   94292.63          1.58     10.02   \n",
       "\n",
       "            turnover  \n",
       "2015-08-28      4.03  \n",
       "2015-05-21      4.15  \n",
       "2016-07-07      1.67  \n",
       "2016-12-22      3.77  \n",
       "2015-08-04      3.23  "
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.sort_values(by=[\"p_change\", \"open\"], ascending=False).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-03-02</th>\n",
       "      <td>12.25</td>\n",
       "      <td>12.67</td>\n",
       "      <td>12.52</td>\n",
       "      <td>12.20</td>\n",
       "      <td>96291.73</td>\n",
       "      <td>0.32</td>\n",
       "      <td>2.62</td>\n",
       "      <td>3.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-03</th>\n",
       "      <td>12.52</td>\n",
       "      <td>13.06</td>\n",
       "      <td>12.70</td>\n",
       "      <td>12.52</td>\n",
       "      <td>139071.61</td>\n",
       "      <td>0.18</td>\n",
       "      <td>1.44</td>\n",
       "      <td>4.76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-04</th>\n",
       "      <td>12.80</td>\n",
       "      <td>12.92</td>\n",
       "      <td>12.90</td>\n",
       "      <td>12.61</td>\n",
       "      <td>67075.44</td>\n",
       "      <td>0.20</td>\n",
       "      <td>1.57</td>\n",
       "      <td>2.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-05</th>\n",
       "      <td>12.88</td>\n",
       "      <td>13.45</td>\n",
       "      <td>13.16</td>\n",
       "      <td>12.87</td>\n",
       "      <td>93180.39</td>\n",
       "      <td>0.26</td>\n",
       "      <td>2.02</td>\n",
       "      <td>3.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-03-06</th>\n",
       "      <td>13.17</td>\n",
       "      <td>14.48</td>\n",
       "      <td>14.28</td>\n",
       "      <td>13.13</td>\n",
       "      <td>179831.72</td>\n",
       "      <td>1.12</td>\n",
       "      <td>8.51</td>\n",
       "      <td>6.16</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low     volume  price_change  p_change  \\\n",
       "2015-03-02  12.25  12.67  12.52  12.20   96291.73          0.32      2.62   \n",
       "2015-03-03  12.52  13.06  12.70  12.52  139071.61          0.18      1.44   \n",
       "2015-03-04  12.80  12.92  12.90  12.61   67075.44          0.20      1.57   \n",
       "2015-03-05  12.88  13.45  13.16  12.87   93180.39          0.26      2.02   \n",
       "2015-03-06  13.17  14.48  14.28  13.13  179831.72          1.12      8.51   \n",
       "\n",
       "            turnover  \n",
       "2015-03-02      3.30  \n",
       "2015-03-03      4.76  \n",
       "2015-03-04      2.30  \n",
       "2015-03-05      3.19  \n",
       "2015-03-06      6.16  "
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.sort_index().head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2015-06-15    34.99\n",
       "2015-06-12    34.69\n",
       "2015-06-10    34.10\n",
       "2017-11-01    33.85\n",
       "2015-06-11    33.17\n",
       "Name: open, dtype: float64"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 对Series进行排序\n",
    "data[\"open\"].sort_values(ascending=False).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2015-03-02    12.25\n",
       "2015-03-03    12.52\n",
       "2015-03-04    12.80\n",
       "2015-03-05    12.88\n",
       "2015-03-06    13.17\n",
       "Name: open, dtype: float64"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[\"open\"].sort_index().head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.3.1 算术运算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2018-02-27    123.53\n",
       "2018-02-26    122.80\n",
       "2018-02-23    122.88\n",
       "2018-02-22    122.25\n",
       "2018-02-14    121.49\n",
       "Name: open, dtype: float64"
      ]
     },
     "execution_count": 125,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[\"open\"].add(100).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 如果想要得到每天的涨跌大小？求出每天 close- open价格差\n",
    "close = data[\"close\"]\n",
    "open_1 = data[\"open\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2018-02-27    0.63\n",
       "2018-02-26    0.73\n",
       "2018-02-23   -0.06\n",
       "2018-02-22    0.03\n",
       "2018-02-14    0.43\n",
       "dtype: float64"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "close.sub(open_1).head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.3.2 逻辑运算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['2018-02-27', '2018-02-26', '2018-02-23', '2018-02-14', '2018-02-12',\n",
       "       '2018-02-05', '2018-01-19', '2018-01-16', '2018-01-12', '2018-01-04',\n",
       "       ...\n",
       "       '2015-04-07', '2015-03-30', '2015-03-27', '2015-03-17', '2015-03-16',\n",
       "       '2015-03-13', '2015-03-10', '2015-03-06', '2015-03-05', '2015-03-02'],\n",
       "      dtype='object', length=183)"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 筛选p_change > 2的日期数据\n",
    "data[data[\"p_change\"] > 2].index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['2018-02-27', '2018-02-26', '2018-02-23', '2018-02-14', '2018-02-12',\n",
       "       '2018-02-05', '2018-01-19', '2018-01-16', '2018-01-12', '2018-01-04',\n",
       "       ...\n",
       "       '2015-05-08', '2015-04-27', '2015-04-21', '2015-04-15', '2015-04-14',\n",
       "       '2015-04-13', '2015-04-09', '2015-04-08', '2015-04-07', '2015-03-30'],\n",
       "      dtype='object', length=161)"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 完成一个多个逻辑判断， 筛选p_change > 2并且open > 15\n",
    "data[(data[\"p_change\"] > 2) & (data[\"open\"] > 15)].index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['2018-02-27', '2018-02-26', '2018-02-23', '2018-02-14', '2018-02-12',\n",
       "       '2018-02-05', '2018-01-19', '2018-01-16', '2018-01-12', '2018-01-04',\n",
       "       ...\n",
       "       '2015-05-08', '2015-04-27', '2015-04-21', '2015-04-15', '2015-04-14',\n",
       "       '2015-04-13', '2015-04-09', '2015-04-08', '2015-04-07', '2015-03-30'],\n",
       "      dtype='object', length=161)"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# query实现\n",
    "data.query(\"p_change > 2 & open > 15\").index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-07-25</th>\n",
       "      <td>23.07</td>\n",
       "      <td>24.20</td>\n",
       "      <td>23.70</td>\n",
       "      <td>22.64</td>\n",
       "      <td>167489.48</td>\n",
       "      <td>0.67</td>\n",
       "      <td>2.91</td>\n",
       "      <td>4.19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016-09-28</th>\n",
       "      <td>19.88</td>\n",
       "      <td>20.98</td>\n",
       "      <td>20.86</td>\n",
       "      <td>19.71</td>\n",
       "      <td>95580.75</td>\n",
       "      <td>0.98</td>\n",
       "      <td>4.93</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-07</th>\n",
       "      <td>16.54</td>\n",
       "      <td>17.98</td>\n",
       "      <td>17.54</td>\n",
       "      <td>16.50</td>\n",
       "      <td>122471.85</td>\n",
       "      <td>0.88</td>\n",
       "      <td>5.28</td>\n",
       "      <td>4.19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low     volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53   95578.03          0.63      2.68   \n",
       "2017-07-25  23.07  24.20  23.70  22.64  167489.48          0.67      2.91   \n",
       "2016-09-28  19.88  20.98  20.86  19.71   95580.75          0.98      4.93   \n",
       "2015-04-07  16.54  17.98  17.54  16.50  122471.85          0.88      5.28   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2017-07-25      4.19  \n",
       "2016-09-28      2.39  \n",
       "2015-04-07      4.19  "
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 判断'turnover'是否为4.19, 2.39\n",
    "data[data[\"turnover\"].isin([4.19, 2.39])]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.3.3 统计运算\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "      <td>643.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>21.272706</td>\n",
       "      <td>21.900513</td>\n",
       "      <td>21.336267</td>\n",
       "      <td>20.771835</td>\n",
       "      <td>99905.519114</td>\n",
       "      <td>0.018802</td>\n",
       "      <td>0.190280</td>\n",
       "      <td>2.936190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.930973</td>\n",
       "      <td>4.077578</td>\n",
       "      <td>3.942806</td>\n",
       "      <td>3.791968</td>\n",
       "      <td>73879.119354</td>\n",
       "      <td>0.898476</td>\n",
       "      <td>4.079698</td>\n",
       "      <td>2.079375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>12.250000</td>\n",
       "      <td>12.670000</td>\n",
       "      <td>12.360000</td>\n",
       "      <td>12.200000</td>\n",
       "      <td>1158.120000</td>\n",
       "      <td>-3.520000</td>\n",
       "      <td>-10.030000</td>\n",
       "      <td>0.040000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>19.000000</td>\n",
       "      <td>19.500000</td>\n",
       "      <td>19.045000</td>\n",
       "      <td>18.525000</td>\n",
       "      <td>48533.210000</td>\n",
       "      <td>-0.390000</td>\n",
       "      <td>-1.850000</td>\n",
       "      <td>1.360000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>21.440000</td>\n",
       "      <td>21.970000</td>\n",
       "      <td>21.450000</td>\n",
       "      <td>20.980000</td>\n",
       "      <td>83175.930000</td>\n",
       "      <td>0.050000</td>\n",
       "      <td>0.260000</td>\n",
       "      <td>2.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>23.400000</td>\n",
       "      <td>24.065000</td>\n",
       "      <td>23.415000</td>\n",
       "      <td>22.850000</td>\n",
       "      <td>127580.055000</td>\n",
       "      <td>0.455000</td>\n",
       "      <td>2.305000</td>\n",
       "      <td>3.915000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>34.990000</td>\n",
       "      <td>36.350000</td>\n",
       "      <td>35.210000</td>\n",
       "      <td>34.010000</td>\n",
       "      <td>501915.410000</td>\n",
       "      <td>3.030000</td>\n",
       "      <td>10.030000</td>\n",
       "      <td>12.560000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open        high       close         low         volume  \\\n",
       "count  643.000000  643.000000  643.000000  643.000000     643.000000   \n",
       "mean    21.272706   21.900513   21.336267   20.771835   99905.519114   \n",
       "std      3.930973    4.077578    3.942806    3.791968   73879.119354   \n",
       "min     12.250000   12.670000   12.360000   12.200000    1158.120000   \n",
       "25%     19.000000   19.500000   19.045000   18.525000   48533.210000   \n",
       "50%     21.440000   21.970000   21.450000   20.980000   83175.930000   \n",
       "75%     23.400000   24.065000   23.415000   22.850000  127580.055000   \n",
       "max     34.990000   36.350000   35.210000   34.010000  501915.410000   \n",
       "\n",
       "       price_change    p_change    turnover  \n",
       "count    643.000000  643.000000  643.000000  \n",
       "mean       0.018802    0.190280    2.936190  \n",
       "std        0.898476    4.079698    2.079375  \n",
       "min       -3.520000  -10.030000    0.040000  \n",
       "25%       -0.390000   -1.850000    1.360000  \n",
       "50%        0.050000    0.260000    2.500000  \n",
       "75%        0.455000    2.305000    3.915000  \n",
       "max        3.030000   10.030000   12.560000  "
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "open                34.99\n",
       "high                36.35\n",
       "close               35.21\n",
       "low                 34.01\n",
       "volume          501915.41\n",
       "price_change         3.03\n",
       "p_change            10.03\n",
       "turnover            12.56\n",
       "dtype: float64"
      ]
     },
     "execution_count": 146,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.max(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "open            2015-06-15\n",
       "high            2015-06-10\n",
       "close           2015-06-12\n",
       "low             2015-06-12\n",
       "volume          2017-10-26\n",
       "price_change    2015-06-09\n",
       "p_change        2015-08-28\n",
       "turnover        2017-10-26\n",
       "dtype: object"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 求最大值所在位置\n",
    "data.idxmax()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10b7628d0>"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type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HSCGOI5xPN/3lMXYBk7XW709x7g8lnW8v4Ac+qLXuVEqtA46lOjYNlwExDIt5vFLqg1rrB3MwH4uh/mZK5fcz4vlkeuwQY48fO9RxuZ5TJtcczm8o0/PH0UM47YEJGAtVleb764FfmK9XAhfb9t1he/1t4DqMR+BNwPw05x9wPuB24GPmtseAK4ZxbMJ4i2E+un8BZSfgGeS7Tjtv+1hGcz5pjh30Ox5sP+A9GFZ8ObANqMrRfM4GHjBfvwosTTOmbwBfsc17DvB54L8xngbewVxoy+S7sG27gNQLryOazzD+Zkri95PNfIZxbMqxD3VsvueU69/QYH+Hqf7LxCd/HTAR43HiRYxV3UyagtwFfALjB/ew1vrtNPulajLyE+B687G7jfSPKKmOTRivUur6IpgPwBkYC459aY5jGPMezfkMec0U3/Fg+z2G4fdeDXxLm66FbOejtV6DYcWuw6iHtDbNmH4EXIEh8Cu11jswIiiWYkRUfF6bv6AcMdJ/H8jsb6ZUfj/ZzCfTY9ONfahj8z2n4Yx1pPulRZKhBEEQxjCSDCUIgjCGEZEXBEEYw4jIC4IgjGFE5AVBEMYwIvKCIAhjGBF5QRCEMYyIvCAIwhjm/wdJf1VU0zpyOQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 累计统计函数\n",
    "data.sort_index()[\"p_change\"].cumsum().plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.3.5 自定义运算"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "            turnover  \n",
       "2018-02-27      2.39  \n",
       "2018-02-26      1.53  \n",
       "2018-02-23      1.32  \n",
       "2018-02-22      0.90  \n",
       "2018-02-14      0.58  "
      ]
     },
     "execution_count": 157,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "open              12.25\n",
       "high              12.67\n",
       "close             12.36\n",
       "low               12.20\n",
       "volume          1158.12\n",
       "price_change      -3.52\n",
       "p_change         -10.03\n",
       "turnover           0.04\n",
       "dtype: float64"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.apply(lambda x:(x.max() - x.min()))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.4 Pandas画图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10b864cc0>"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEHCAYAAABCwJb2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAA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 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.plot(x=\"p_change\", y=\"turnover\", kind=\"scatter\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x10b8f84e0>"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEGCAYAAACJnEVTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3XuUlNWZ7/Hvft+60IJcBBW5aUyLHpoAiR1B8QaJGaJAzAJJxlsSR5mTJUlmaYQzY4hRlsl4iTmJMskQk0l0SCYIiRfUGCMYAypOmwEEjkE0Kg2JlxbRxqa66619/qiu6rq81VXdXVVd1fX7rOWyu6uq391l+dSuZz/72cZai4iI1AanvwcgIiLlo6AvIlJDFPRFRGqIgr6ISA1R0BcRqSEK+iIiNURBX0Skhijoi4jUEAV9EZEaEujvAWQaNWqUPeGEE/p7GCIiVeX5559/21p7dL77VVzQP+GEE2hqaurvYYiIVBVjzGuF3E/pHRGRGqKgLyJSQxT0RURqiIK+iEgNUdAXEakhCvoiIv2gpTXCtr3v0tIaKet1K65kU0RkoHtg6z6WrdtO0HHoiMW4dcEU5k8bW5ZrF32mb4wJGGPuM8ZsNsb81BgzxxjTbIzZ1PnPycW+pohItWhpjbBs3XYOd8R4PxLlcEeMpeu2l23GX4r0zoXANmvtTOA4YBrwQ2vtmZ3//LkE1xQRqQrNB9oIOumhN+g4NB9oK8v1SxH0fwvcYYwJAMOB94AFxpjnjDHrjDGmBNcUEakK40bU0RGLpf2sIxZj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v5hinSNwr6InF3Aw3GmM3AROL5/cbOPjnDgAeBHwPnG2OeJp7qeb2fxirSa+q9I+Kjc4H2SWvtk/08FJGiUtAXEakhSu+IiNQQBX0RkRqioC8iUkMU9EVEaoiCvohIDVHQFxGpIf8fNnLNpEBmzgoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "data.plot(x=\"open\", y=\"close\", kind=\"scatter\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.5.1 CSV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low\n",
       "2018-02-27  23.53  25.88  24.16  23.53\n",
       "2018-02-26  22.80  23.78  23.53  22.80\n",
       "2018-02-23  22.88  23.37  22.82  22.71\n",
       "2018-02-22  22.25  22.76  22.28  22.02\n",
       "2018-02-14  21.49  21.99  21.92  21.48"
      ]
     },
     "execution_count": 168,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv(\"./stock_day/stock_day.csv\", usecols=[\"open\", \"close\", \"high\", \"low\"]).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>close</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>price_change</th>\n",
       "      <th>p_change</th>\n",
       "      <th>ma5</th>\n",
       "      <th>ma10</th>\n",
       "      <th>ma20</th>\n",
       "      <th>v_ma5</th>\n",
       "      <th>v_ma10</th>\n",
       "      <th>v_ma20</th>\n",
       "      <th>turnover</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-02-27</th>\n",
       "      <td>23.53</td>\n",
       "      <td>25.88</td>\n",
       "      <td>24.16</td>\n",
       "      <td>23.53</td>\n",
       "      <td>95578.03</td>\n",
       "      <td>0.63</td>\n",
       "      <td>2.68</td>\n",
       "      <td>22.942</td>\n",
       "      <td>22.142</td>\n",
       "      <td>22.875</td>\n",
       "      <td>53782.64</td>\n",
       "      <td>46738.65</td>\n",
       "      <td>55576.11</td>\n",
       "      <td>2.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-26</th>\n",
       "      <td>22.80</td>\n",
       "      <td>23.78</td>\n",
       "      <td>23.53</td>\n",
       "      <td>22.80</td>\n",
       "      <td>60985.11</td>\n",
       "      <td>0.69</td>\n",
       "      <td>3.02</td>\n",
       "      <td>22.406</td>\n",
       "      <td>21.955</td>\n",
       "      <td>22.942</td>\n",
       "      <td>40827.52</td>\n",
       "      <td>42736.34</td>\n",
       "      <td>56007.50</td>\n",
       "      <td>1.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-23</th>\n",
       "      <td>22.88</td>\n",
       "      <td>23.37</td>\n",
       "      <td>22.82</td>\n",
       "      <td>22.71</td>\n",
       "      <td>52914.01</td>\n",
       "      <td>0.54</td>\n",
       "      <td>2.42</td>\n",
       "      <td>21.938</td>\n",
       "      <td>21.929</td>\n",
       "      <td>23.022</td>\n",
       "      <td>35119.58</td>\n",
       "      <td>41871.97</td>\n",
       "      <td>56372.85</td>\n",
       "      <td>1.32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-22</th>\n",
       "      <td>22.25</td>\n",
       "      <td>22.76</td>\n",
       "      <td>22.28</td>\n",
       "      <td>22.02</td>\n",
       "      <td>36105.01</td>\n",
       "      <td>0.36</td>\n",
       "      <td>1.64</td>\n",
       "      <td>21.446</td>\n",
       "      <td>21.909</td>\n",
       "      <td>23.137</td>\n",
       "      <td>35397.58</td>\n",
       "      <td>39904.78</td>\n",
       "      <td>60149.60</td>\n",
       "      <td>0.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-14</th>\n",
       "      <td>21.49</td>\n",
       "      <td>21.99</td>\n",
       "      <td>21.92</td>\n",
       "      <td>21.48</td>\n",
       "      <td>23331.04</td>\n",
       "      <td>0.44</td>\n",
       "      <td>2.05</td>\n",
       "      <td>21.366</td>\n",
       "      <td>21.923</td>\n",
       "      <td>23.253</td>\n",
       "      <td>33590.21</td>\n",
       "      <td>42935.74</td>\n",
       "      <td>61716.11</td>\n",
       "      <td>0.58</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             open   high  close    low    volume  price_change  p_change  \\\n",
       "2018-02-27  23.53  25.88  24.16  23.53  95578.03          0.63      2.68   \n",
       "2018-02-26  22.80  23.78  23.53  22.80  60985.11          0.69      3.02   \n",
       "2018-02-23  22.88  23.37  22.82  22.71  52914.01          0.54      2.42   \n",
       "2018-02-22  22.25  22.76  22.28  22.02  36105.01          0.36      1.64   \n",
       "2018-02-14  21.49  21.99  21.92  21.48  23331.04          0.44      2.05   \n",
       "\n",
       "               ma5    ma10    ma20     v_ma5    v_ma10    v_ma20  turnover  \n",
       "2018-02-27  22.942  22.142  22.875  53782.64  46738.65  55576.11      2.39  \n",
       "2018-02-26  22.406  21.955  22.942  40827.52  42736.34  56007.50      1.53  \n",
       "2018-02-23  21.938  21.929  23.022  35119.58  41871.97  56372.85      1.32  \n",
       "2018-02-22  21.446  21.909  23.137  35397.58  39904.78  60149.60      0.90  \n",
       "2018-02-14  21.366  21.923  23.253  33590.21  42935.74  61716.11      0.58  "
      ]
     },
     "execution_count": 172,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_csv(\"stock_day2.csv\", names=[\"open\",\"high\",\"close\",\"low\",\"volume\",\"price_change\",\"p_change\",\"ma5\",\"ma10\",\"ma20\",\"v_ma5\",\"v_ma10\",\"v_ma20\",\"turnover\"]).head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 写入文件\n",
    "data[:10].to_csv(\"test0.csv\", columns=[\"high\"], index=False, mode=\"a\", header=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>high</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>25.88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>23.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>23.37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>22.76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21.99</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    high\n",
       "0  25.88\n",
       "1  23.78\n",
       "2  23.37\n",
       "3  22.76\n",
       "4  21.99"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 读取存储的文件\n",
    "pd.read_csv(\"test0.csv\").head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.5.2 HDF5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_hdf(\"./stock_data/day/day_close.h5\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {},
   "outputs": [],
   "source": [
    "data.to_hdf(\"test.h5\", key=\"close\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {},
   "outputs": [],
   "source": [
    "data2 = pd.read_hdf(\"./stock_data/day/day_open.h5\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 189,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>000001.SZ</th>\n",
       "      <th>000002.SZ</th>\n",
       "      <th>000004.SZ</th>\n",
       "      <th>000005.SZ</th>\n",
       "      <th>000006.SZ</th>\n",
       "      <th>000007.SZ</th>\n",
       "      <th>000008.SZ</th>\n",
       "      <th>000009.SZ</th>\n",
       "      <th>000010.SZ</th>\n",
       "      <th>000011.SZ</th>\n",
       "      <th>...</th>\n",
       "      <th>001965.SZ</th>\n",
       "      <th>603283.SH</th>\n",
       "      <th>002920.SZ</th>\n",
       "      <th>002921.SZ</th>\n",
       "      <th>300684.SZ</th>\n",
       "      <th>002922.SZ</th>\n",
       "      <th>300735.SZ</th>\n",
       "      <th>603329.SH</th>\n",
       "      <th>603655.SH</th>\n",
       "      <th>603080.SH</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>15.50</td>\n",
       "      <td>16.15</td>\n",
       "      <td>4.26</td>\n",
       "      <td>2.73</td>\n",
       "      <td>13.99</td>\n",
       "      <td>2.52</td>\n",
       "      <td>4.76</td>\n",
       "      <td>4.45</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.79</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>16.50</td>\n",
       "      <td>17.94</td>\n",
       "      <td>4.53</td>\n",
       "      <td>2.91</td>\n",
       "      <td>14.78</td>\n",
       "      <td>2.61</td>\n",
       "      <td>4.99</td>\n",
       "      <td>4.69</td>\n",
       "      <td>5.37</td>\n",
       "      <td>6.03</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>17.00</td>\n",
       "      <td>18.80</td>\n",
       "      <td>4.63</td>\n",
       "      <td>3.04</td>\n",
       "      <td>16.08</td>\n",
       "      <td>2.65</td>\n",
       "      <td>4.96</td>\n",
       "      <td>4.73</td>\n",
       "      <td>5.37</td>\n",
       "      <td>6.26</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>16.95</td>\n",
       "      <td>16.59</td>\n",
       "      <td>4.52</td>\n",
       "      <td>3.02</td>\n",
       "      <td>13.20</td>\n",
       "      <td>2.63</td>\n",
       "      <td>4.81</td>\n",
       "      <td>4.35</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.74</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>16.20</td>\n",
       "      <td>16.96</td>\n",
       "      <td>4.50</td>\n",
       "      <td>2.95</td>\n",
       "      <td>13.17</td>\n",
       "      <td>2.80</td>\n",
       "      <td>4.88</td>\n",
       "      <td>4.34</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.80</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 3562 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   000001.SZ  000002.SZ  000004.SZ  000005.SZ  000006.SZ  000007.SZ  \\\n",
       "0      15.50      16.15       4.26       2.73      13.99       2.52   \n",
       "1      16.50      17.94       4.53       2.91      14.78       2.61   \n",
       "2      17.00      18.80       4.63       3.04      16.08       2.65   \n",
       "3      16.95      16.59       4.52       3.02      13.20       2.63   \n",
       "4      16.20      16.96       4.50       2.95      13.17       2.80   \n",
       "\n",
       "   000008.SZ  000009.SZ  000010.SZ  000011.SZ    ...      001965.SZ  \\\n",
       "0       4.76       4.45       5.37       5.79    ...            NaN   \n",
       "1       4.99       4.69       5.37       6.03    ...            NaN   \n",
       "2       4.96       4.73       5.37       6.26    ...            NaN   \n",
       "3       4.81       4.35       5.37       5.74    ...            NaN   \n",
       "4       4.88       4.34       5.37       5.80    ...            NaN   \n",
       "\n",
       "   603283.SH  002920.SZ  002921.SZ  300684.SZ  002922.SZ  300735.SZ  \\\n",
       "0        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "1        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "2        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "3        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "4        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "\n",
       "   603329.SH  603655.SH  603080.SH  \n",
       "0        NaN        NaN        NaN  \n",
       "1        NaN        NaN        NaN  \n",
       "2        NaN        NaN        NaN  \n",
       "3        NaN        NaN        NaN  \n",
       "4        NaN        NaN        NaN  \n",
       "\n",
       "[5 rows x 3562 columns]"
      ]
     },
     "execution_count": 189,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [],
   "source": [
    "data2.to_hdf(\"test.h5\", key=\"open\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>000001.SZ</th>\n",
       "      <th>000002.SZ</th>\n",
       "      <th>000004.SZ</th>\n",
       "      <th>000005.SZ</th>\n",
       "      <th>000006.SZ</th>\n",
       "      <th>000007.SZ</th>\n",
       "      <th>000008.SZ</th>\n",
       "      <th>000009.SZ</th>\n",
       "      <th>000010.SZ</th>\n",
       "      <th>000011.SZ</th>\n",
       "      <th>...</th>\n",
       "      <th>001965.SZ</th>\n",
       "      <th>603283.SH</th>\n",
       "      <th>002920.SZ</th>\n",
       "      <th>002921.SZ</th>\n",
       "      <th>300684.SZ</th>\n",
       "      <th>002922.SZ</th>\n",
       "      <th>300735.SZ</th>\n",
       "      <th>603329.SH</th>\n",
       "      <th>603655.SH</th>\n",
       "      <th>603080.SH</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>15.50</td>\n",
       "      <td>16.15</td>\n",
       "      <td>4.26</td>\n",
       "      <td>2.73</td>\n",
       "      <td>13.99</td>\n",
       "      <td>2.52</td>\n",
       "      <td>4.76</td>\n",
       "      <td>4.45</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.79</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>16.50</td>\n",
       "      <td>17.94</td>\n",
       "      <td>4.53</td>\n",
       "      <td>2.91</td>\n",
       "      <td>14.78</td>\n",
       "      <td>2.61</td>\n",
       "      <td>4.99</td>\n",
       "      <td>4.69</td>\n",
       "      <td>5.37</td>\n",
       "      <td>6.03</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>17.00</td>\n",
       "      <td>18.80</td>\n",
       "      <td>4.63</td>\n",
       "      <td>3.04</td>\n",
       "      <td>16.08</td>\n",
       "      <td>2.65</td>\n",
       "      <td>4.96</td>\n",
       "      <td>4.73</td>\n",
       "      <td>5.37</td>\n",
       "      <td>6.26</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>16.95</td>\n",
       "      <td>16.59</td>\n",
       "      <td>4.52</td>\n",
       "      <td>3.02</td>\n",
       "      <td>13.20</td>\n",
       "      <td>2.63</td>\n",
       "      <td>4.81</td>\n",
       "      <td>4.35</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.74</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>16.20</td>\n",
       "      <td>16.96</td>\n",
       "      <td>4.50</td>\n",
       "      <td>2.95</td>\n",
       "      <td>13.17</td>\n",
       "      <td>2.80</td>\n",
       "      <td>4.88</td>\n",
       "      <td>4.34</td>\n",
       "      <td>5.37</td>\n",
       "      <td>5.80</td>\n",
       "      <td>...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 3562 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   000001.SZ  000002.SZ  000004.SZ  000005.SZ  000006.SZ  000007.SZ  \\\n",
       "0      15.50      16.15       4.26       2.73      13.99       2.52   \n",
       "1      16.50      17.94       4.53       2.91      14.78       2.61   \n",
       "2      17.00      18.80       4.63       3.04      16.08       2.65   \n",
       "3      16.95      16.59       4.52       3.02      13.20       2.63   \n",
       "4      16.20      16.96       4.50       2.95      13.17       2.80   \n",
       "\n",
       "   000008.SZ  000009.SZ  000010.SZ  000011.SZ    ...      001965.SZ  \\\n",
       "0       4.76       4.45       5.37       5.79    ...            NaN   \n",
       "1       4.99       4.69       5.37       6.03    ...            NaN   \n",
       "2       4.96       4.73       5.37       6.26    ...            NaN   \n",
       "3       4.81       4.35       5.37       5.74    ...            NaN   \n",
       "4       4.88       4.34       5.37       5.80    ...            NaN   \n",
       "\n",
       "   603283.SH  002920.SZ  002921.SZ  300684.SZ  002922.SZ  300735.SZ  \\\n",
       "0        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "1        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "2        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "3        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "4        NaN        NaN        NaN        NaN        NaN        NaN   \n",
       "\n",
       "   603329.SH  603655.SH  603080.SH  \n",
       "0        NaN        NaN        NaN  \n",
       "1        NaN        NaN        NaN  \n",
       "2        NaN        NaN        NaN  \n",
       "3        NaN        NaN        NaN  \n",
       "4        NaN        NaN        NaN  \n",
       "\n",
       "[5 rows x 3562 columns]"
      ]
     },
     "execution_count": 193,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 读取多个键的h5文件\n",
    "pd.read_hdf(\"test.h5\", key=\"open\").head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4.5.3 JSON"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_json(\"Sarcasm_Headlines_Dataset.json\", orient=\"records\", lines=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>article_link</th>\n",
       "      <th>headline</th>\n",
       "      <th>is_sarcastic</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>https://www.huffingtonpost.com/entry/versace-b...</td>\n",
       "      <td>former versace store clerk sues over secret 'b...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>https://www.huffingtonpost.com/entry/roseanne-...</td>\n",
       "      <td>the 'roseanne' revival catches up to our thorn...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>https://local.theonion.com/mom-starting-to-fea...</td>\n",
       "      <td>mom starting to fear son's web series closest ...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>https://politics.theonion.com/boehner-just-wan...</td>\n",
       "      <td>boehner just wants wife to listen, not come up...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>https://www.huffingtonpost.com/entry/jk-rowlin...</td>\n",
       "      <td>j.k. rowling wishes snape happy birthday in th...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        article_link  \\\n",
       "0  https://www.huffingtonpost.com/entry/versace-b...   \n",
       "1  https://www.huffingtonpost.com/entry/roseanne-...   \n",
       "2  https://local.theonion.com/mom-starting-to-fea...   \n",
       "3  https://politics.theonion.com/boehner-just-wan...   \n",
       "4  https://www.huffingtonpost.com/entry/jk-rowlin...   \n",
       "\n",
       "                                            headline  is_sarcastic  \n",
       "0  former versace store clerk sues over secret 'b...             0  \n",
       "1  the 'roseanne' revival catches up to our thorn...             0  \n",
       "2  mom starting to fear son's web series closest ...             1  \n",
       "3  boehner just wants wife to listen, not come up...             1  \n",
       "4  j.k. rowling wishes snape happy birthday in th...             0  "
      ]
     },
     "execution_count": 196,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 写入json\n",
    "data.to_json(\"test.json\", orient=\"records\", lines=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
